window.workspace = function(){
	var response  = <?#$respons?>;
	var store, grid;
	var sid = {'reason':Ext.id(),'userid':Ext.id(), 'status':Ext.id(),'sdate':Ext.id(), 'edate':Ext.id()};
	store = new Ext.data.JsonStore({
	    autoDestroy	: true,
	    url			: '/admin/live/log/banplay/dolist.html',
	    remoteSort	: true,
	    sortInfo	: {
	            field		: 'id',
	            direction	: 'DESC'
		},
		baseParams	: {
			start	: 0,
			limit	: main.pageSize
		},
		autoLoad		: true,
	    root			: 'dataset',
	 	totalProperty	: 'total',
	    fields			: ['id', 'studioid', 'userid', 'nickname', 'pic', 'duration', 'reason', 'status', 'operator', 'stime']
	});
 	grid = {
		xtype		: 'grid',
		title		: response.title,
	    store		: store,
		region		: 'center', 
	    columns		: [
			{header: '编号[ID]', width:50, sortable:true, dataIndex:'id'},
			{header: '主播昵称[Nickname]', width:60, sortable:true, dataIndex:'nickname'},
			{header: '直播间ID[Studioid]', width:50, sortable:true, dataIndex:'studioid'},
			{header: '用户ID[Userid]', width:50, sortable:true, dataIndex:'userid'},
			{header: '禁播时长[Duration]', width:50, sortable:true, dataIndex:'duration', renderer:function(v){
				return response.duration[v];
			}},
			{header: '禁播原因[Reason]', width:100, dataIndex:'reason'},
			{header: '禁播状态[Status]', width:50, sortable:true, dataIndex:'status', renderer:function(v){
				return response.status[v];
			}},
			{header: '操作人[Operator]', width:50, dataIndex:'operator'},
			{header: '操作时间[AddTime]', width:60, dataIndex:'stime'}
		],
	    viewConfig	: {
	        forceFit	 : true,
	        scrollOffset : 0
	    },
	    listeners	: {
	    	'render':function(obj){
				main.gridRender(obj, ['pic'], 400);
	    	}
		},
	    stripeRows	: true,
	    tbar		: [{
			text	: 'Reload',
			iconCls	: 'icon-refresh',
			handler : function(){
				store.reload(); 
			}
	    },'-','<b>Search For：</b>','-','Anchor:',{
			xtype		: 'combo',
			store		: new Ext.data.JsonStore({
				url	: '/admin/live/share/douser.html',
				autoDestroy: true,
				fields: ['id', 'name'],
				root: 'dataset'
			}),
			id	    	    : sid.userid,
			displayField	: 'name',
			valueField		: 'id',
			emptyText		: 'Selected...',
			minChars		: 1,
			 pageSize		: 10,
			listWidth		: 258,
			width			: 160,
			typeAhead		: true,
			typeAheadDelay  : 0,
			triggerAction	: 'all',
			enableKeyEvents : true,
			mode			: 'remote'
		},'-','Reason:',{
			xtype       : 'textfield',
			id	    	: sid.reason,
			width	    : 160
		},'-','Status:',{
			xtype		: 'combo',
			store		: new Ext.data.ArrayStore({
		        fields: ['id','name'],
		        data: main.cv2Array(response.status)
		    }),
			displayField	: 'name',
			valueField		: 'id',
			mode			: 'local',
			triggerAction	: 'all',
			emptyText		: 'selected...',
			width			: 110,
			id  			: sid.status
		},'-','AddTime:',{
			xtype       : 'datefield',
			id  		: sid.sdate,
			width	    : 120
		},'<->',{
			xtype       : 'datefield',
			id  		: sid.edate,
			width	    : 120
		},'-',{
			text			: 'DoSearch',
			iconCls			: 'icon-search',
			handler: function() {
				store.baseParams.userid   = Ext.getCmp(sid.userid).getValue();
				store.baseParams.reason   = Ext.getCmp(sid.reason).getValue();
				store.baseParams.status   = Ext.getCmp(sid.status).getValue();
				store.baseParams.sdate    = Ext.getCmp(sid.sdate).getValue();
				store.baseParams.edate    = Ext.getCmp(sid.edate).getValue();
				store.reload(); 
			}
		}],
		bbar		: new Ext.PagingToolbar({
			pageSize	: main.pageSize,
			store		: store,
			displayInfo	: true
		})
	};
	return grid;
}();